package com.kyivmohyla.kma2.shared.model;

import java.io.Serializable;

public class UIService implements Serializable {
    private static final long serialVersionUID = 1L;
    private int serviceId;
    private String name;
    private int isParent;
    private int parentId;
    private String description;

    public UIService(int serviceId, String name, int isParent, int parentId, String description) {
        this.serviceId = serviceId;
        this.name = name;
        this.isParent = isParent;
        this.parentId = parentId;
        this.description = description;
    }

    public UIService() {
    }

    public int getServiceId() {
        return serviceId;
    }

    public void setServiceId(int serviceId) {
        this.serviceId = serviceId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIsParent() {
        return isParent;
    }

    public void setIsParent(int isParent) {
        this.isParent = isParent;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return "Service(serviceId = " + serviceId + ", name = " + name + ", isParent = " + isParent + ", parentId = " + parentId + ", description = " + description + ")";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UIService uiService = (UIService) o;

        return serviceId == uiService.serviceId;

    }

    @Override
    public int hashCode() {
        return serviceId;
    }
}
